Skip to main content
Version: 5.3

Async Sync Service

This service offers methods for the asynchronous import of time entries or projects. The asynchronous import has the advantage that the client can be informed about the current state of the import via the offered call back service. This can be very useful with big and long running imports.

ApplyStaticData

This method imports the given projects and merges it with the already existing.

void ApplyStaticData(  
TpAuthentication authentication,
IEnumerable<ProjectDto> projects,
IEnumerable<TaskDto> commonTasks,
IEnumerable<CustomerDto> customers);
Needed Permissionprojects@download
NameModifierDescription
authenticationUser authentication
projectsCollection of projects that shall be imported.
commonTasksCollection of common tasks that shall be imported.
customersCollection of customers that shall be imported.

ApplyTimeEntries

This method imports the given time-entries, projects as well as tasks and merges it with the already existing.

void ApplyTimeEntries(  
TpAuthentication authentication,
IEnumerable<TimeEntrySaveDto> timeEntries,
IEnumerable<ProjectDto> projects,
IEnumerable<TaskDto> commonTasks,
IEnumerable<CustomerDto> customers);
Needed Permissionprojects@download
NameModifierDescription
authenticationUser authentication
timeEntriesCollection of time entries to impoert
projectsCollection of projects that are referenced by the time entries.
commonTasksCollection of common tasks that are referenced by the time entries.
customersCollection of customers that that are referenced by the time entries.

ITpSyncCallbackService

In order to use the call back service, the ITpSyncCallbackService Interface of the client needs to be implemented.

Code Snippet

[ServiceContract]  
public interface ITpSyncCallbackService
{
/// <summary>
/// Informs the Client that the current sync failed with an exception
/// </summary>
/// <param name="fault">The fault.</param>
[OperationContract (IsOneWay=true)]
void SyncFailed(TpFault fault);

/// <summary>
/// Informs the Client that the current sync succeeded properly
/// </summary>
[OperationContract(IsOneWay = true)]
void SyncSucceeded();

/// <summary>
/// Informs the Client about the progress of the sync process
/// </summary>
[OperationContract(IsOneWay = true)]
void SyncProgress(int percent);
}